package com.daigoudao.web.service.impl;

import java.util.List;

import com.daigoudao.web.dao.IEvaluateDao;
import com.daigoudao.web.model.EvaluateModel;
import com.daigoudao.web.service.IEvaluateService;

public class EvaluateServiceImpl implements IEvaluateService {

	private IEvaluateDao evaluateDao;

	public void setEvaluateDao(IEvaluateDao evaluateDao) {
		this.evaluateDao = evaluateDao;
	}

	@Override
	public float queryAvgEvaluateLevel(int productId) throws Exception {
		return evaluateDao.queryAvgEvaluateLevel(productId);
	}

	@Override
	public int getEvaluateCount(EvaluateModel evaluateModel) throws Exception {
		return evaluateDao.getEvaluateCount(evaluateModel);
	}

	public List<EvaluateModel> queryEvaluates(EvaluateModel evaluateModel)
			throws Exception {
		return evaluateDao.queryEvaluates(evaluateModel);
	}

}
